type ApiErrorType = 'CLIENT_ERROR' | 'SERVER_ERROR' | 'BIZ_ERROR' | 'UNKNOWN_ERROR';

export default class ApiError extends Error {
  #type: ApiErrorType;

  constructor(message: string, type: ApiErrorType) {
    super(message);
    this.#type = type;
  }

  get type() {
    return this.#type;
  }
}
